home *** CD-ROM | disk | FTP | other *** search
- if(drag && !mouseButton)
- {
- drag = false;
- §§push(grid);
- §§push("_visible");
- §§push(false);
- }
- else
- {
- if((status == "waiting" || status == "moving") && mouseButton && !mouseButtonLast && mouseX > 0 && mouseX < 9 && mouseY > 0 && mouseY < 8)
- {
- i = 0;
- while(i < pNum)
- {
- if(pX[i] == mouseX && pY[i] == mouseY && !pUsed[i])
- {
- drag = true;
- grid._visible = true;
- dragNum = i;
- pObj1[dragNum]._alpha = 60;
- pObj1[dragNum]._xscale = 110;
- pObj1[dragNum]._yscale = 110;
- pObj1[dragNum].swapDepths(3997);
- pObj2[dragNum]._alpha = 60;
- pObj2[dragNum]._xscale = 110;
- pObj2[dragNum]._yscale = 110;
- pObj2[dragNum].swapDepths(3998);
- pObj3[dragNum]._alpha = 60;
- pObj3[dragNum]._xscale = 110;
- pObj3[dragNum]._yscale = 110;
- pObj3[dragNum].swapDepths(3999);
- }
- i++;
- }
- }
- mouseButtonLast = mouseButton;
- if(drag)
- {
- pObj1[dragNum]._x = _xmouse;
- pObj1[dragNum]._y = _ymouse;
- pObj2[dragNum]._x = _xmouse;
- pObj2[dragNum]._y = _ymouse;
- pObj3[dragNum]._x = _xmouse;
- pObj3[dragNum]._y = _ymouse;
- }
- if(status == "dead")
- {
- dead.dY += 0.6;
- dead._x += dead.dX;
- dead._y += dead.dY;
- dead.count--;
- if(dead.count == 0)
- {
- status = "buried";
- }
- }
- if(timer == maxTimer)
- {
- musicWaiting.gotoAndPlay(2);
- }
- if(status == "waiting")
- {
- timer -= 0.05;
- }
- clock.gotoAndStop(1 + Math.floor(990 * (maxTimer - timer) / maxTimer));
- if(timer < 10 && soundTime._currentframe == 1)
- {
- soundTime.gotoAndStop(2);
- }
- if(timer <= 0 && status == "waiting")
- {
- stopAllSounds();
- timer = 0;
- start2.gotoAndPlay("cageOpen");
- start3.gotoAndPlay("cageOpen");
- status = "moving";
- }
- if(Math.random() < 0.012 && cat._currentframe == 1)
- {
- if(hamsterY > 4)
- {
- cat._rotation = 180;
- cat._y = -38;
- }
- else
- {
- cat._rotation = 0;
- cat._y = 524;
- }
- var i = Math.floor(1 + 5.99 * Math.random());
- switch(i)
- {
- case 1:
- cat.swapDepths(4500);
- cat.gotoAndPlay("catAppear1");
- break;
- case 2:
- cat.swapDepths(500);
- cat.gotoAndPlay("catAppear2");
- break;
- case 3:
- cat.swapDepths(500);
- cat.gotoAndPlay("catAppear3");
- break;
- case 4:
- cat.swapDepths(4500);
- cat.gotoAndPlay("catAppear4");
- break;
- case 5:
- cat.swapDepths(500);
- cat.gotoAndPlay("catAppear5");
- break;
- case 6:
- cat.swapDepths(500);
- cat.gotoAndPlay("catAppear6");
- }
- cat._x = 32 + 70 * hamsterX + Math.floor(70 * Math.random());
- }
- }
-